#include<bits/stdc++.h>
using namespace std;
#define pct __builtin_popcount
const int N=(1<<20)+100,M=1e9+7;
using ll=long long;
const ll INF=1e18;
using ul=unsigned long long;
using vt=vector<int>;
int T,n,m,K,a[N],b[N],d[305][305];
void ckmn(int &x,int y){if(x>y)x=y;}
ll h[605],d1[605],ans[605];
int pr[605];
bitset<605>vs,v1;
bitset<305>g[305];
ll dijk(){
    int i,j,k,l,r,x,y,z;
    for(x=0;x<=n+n;++x)d1[x]=INF,v1[x]=pr[x]=0;
    for(x=1;x<=n;++x)if(!vs[x])d1[x]=0;
    while(1){
        for(k=0,x=1;x<=n+n;++x)
            if(!v1[x]&&d1[x]<d1[k])k=x;
        if(!k)break;v1[k]=1;
        if(k>n){
            for(x=1;x<=n;++x)
                if(g[x][k-n]&&d1[x]>d1[k]+h[k]-h[x]-d[x][k-n])
                    d1[x]=d1[k]+h[k]-h[x]-d[x][k-n],pr[x]=k;
        }else{
            for(x=1;x<=n;++x)
                if(!g[k][x]&&d1[x+n]>d1[k]+h[k]-h[x+n]+d[k][x])
                    d1[x+n]=d1[k]+h[k]-h[x+n]+d[k][x],pr[x+n]=k;
        }
    }
    for(x=1;x<=n+n;++x)h[x]+=d1[x];
    ll res=INF;
    for(x=1;x<=n;++x)
        if(!vs[x+n])res=min(res,h[x+n]);
    for(x=1;x<=n;++x)
        if(!vs[x+n]&&h[x+n]==res){
            vs[x+n]=1;
            for(y=x+n;pr[y];y=pr[y])
                if(y>n)g[pr[y]][y-n]=1;
                else g[y][pr[y]-n]=0;
            vs[y]=1;return res;
        }
    return INF;
}
int main(){
    ios::sync_with_stdio(false),cin.tie(0);
    freopen("journey.in","r",stdin);
    freopen("journey.out","w",stdout);
    int i,j,k,l,r,x,y,z;
    cin>>n>>m>>T;
    for(x=1;x<=n;++x)
        for(y=1;y<=n;++y)
            d[x][y]=M;
    while(m--){
        cin>>x>>y>>k;
        d[x][y]=min(d[x][y],k);
    }
    for(k=1;k<=n;++k)
        for(i=1;i<=n;++i)
            for(j=1;j<=n;++j)
                ckmn(d[i][j],d[i][k]+d[k][j]);
    for(i=1;i<=n;++i)ans[n-i]=ans[n-i+1]+dijk();
    while(T--){
        cin>>k;
        ll res=INF;
        for(i=0;i<=n;++i)
            res=min(res,ans[i]+1ll*k*i);
        printf("%lld\n",res);
    }
    return 0;
}